  <template>
  <div>
    <h1>这是detail组件</h1>
    <Child :msg="msg" @send="receive"></Child>
  </div>
</template>

<script>
import { defineComponent, ref } from 'vue';
import Child from '../components/child/Child.vue'

export default defineComponent({
  name: 'Detail',
  components: {
    Child
  },
  setup() {
    let msg = ref('这是父组件信息')

    const receive = (val) => {
      console.log(val)
    }

    return {
      msg, receive
    }
  }
})
</script>
